package com.thti.mecool.client.command.result.system;

import com.thti.mecool.client.activity.LoginActivity;
import com.thti.mecool.client.command.ICommand;
import com.thti.mecool.client.protocol.system.VersionDetailResultProtocol;
import com.thti.mecool.client.service.Protocol;

public class VersionCommand implements ICommand{

	@Override
	public void doCommand(Object o) {
		VersionDetailResultProtocol versionDetailResultProtocol=(VersionDetailResultProtocol)o;
		if(versionDetailResultProtocol.getStatus()==1){
			LoginActivity.handler.sendMessage(LoginActivity.handler.obtainMessage(0xDD, versionDetailResultProtocol.getApklatest()));
			System.out.println("versionDetailResultProtocol.getApklatest()"+versionDetailResultProtocol.getApklatest().getOptUrl()+"版本"+versionDetailResultProtocol.getApklatest().getVersion());
		}
		
	}

	@Override
	public String getCommandID() {
		// TODO Auto-generated method stub
		return Protocol.getVersion;
	}

	@Override
	public Class<?> getCommandClass() {
		// TODO Auto-generated method stub
		return VersionDetailResultProtocol.class;
	}

}
